package business.menuForm_Evt;

import javax.swing.JFrame;

import presentation.helpForm_UI.HelpForm_UI;
import presentation.optionForm_UI.OptionForm_UI;
import presentation.playgameForm_UI.PlayGameForm_UI;
import business.playgameForm_Evt.PlaySound;

public class MenuForm_Evt {

        private JFrame frame;
        private PlaySound sound = new PlaySound();
        
        public MenuForm_Evt(JFrame frame) {
                this.frame = frame;
        }

        public void btExit_Event() {
        		try {
					Thread.sleep(150);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
                System.exit(0);
        }

        public void showOption() {
                new OptionForm_UI(frame).setVisible(true);
        }

        public void showHelp() {
                new HelpForm_UI(frame).setVisible(true);
        }

        public void showPlay() {
                frame.setVisible(false);
                new PlayGameForm_UI(frame).setVisible(true);
        }

        public void playMouse_Preesed() {
        	try
        	{
        		sound.soundMode = PlaySound.MOUSE_PRESSED;
        		Thread thread = new Thread(sound);
        		thread.start();
        	}catch(Exception ex){}
        	
        }
//        public void playMouse_Over() {
//        	try
//			{
//				sound.soundMode = PlaySound.MOUSE_OVER;
//				Thread thread = new Thread(sound);
//				thread.start();
//			}catch(Exception ex){}
//                
//        }

}
